<template>
  <a-modal v-model:open="visible" style="top: 20px" title="选择用户" width="60%" :footer-style="{ textAlign: 'right' }" @ok="handleOk">
    <UserList ref="userListRefs" />
  </a-modal>
</template>
<script setup>
  import { def } from '@vue/shared';
  import { ref, watch, computed } from 'vue';
  import UserList from '@/views/system/user/index.vue';
  let visible = ref(false);

  const showUserModel = (val) => {
    console.log(val);
    visible.value = val;
  };

  const userListRefs = ref(null);
  const emits = defineEmits(['selectUser'])
  const handleOk = () => {
    console.log(userListRefs.value.selectedRows);
    emits('selectUser', userListRefs.value.selectedRows);
    visible.value = false;
  };
  defineExpose({
    showUserModel,
  });
</script>
<style lang="css" scoped></style>
